import { http } from "@/utils/http";
const apiRouter = `admin-dept`;

//修改
export const putV1OmsDept = (data?: object) => {
  return http.request<any>("post", `/${apiRouter}?action=update`, { data });
};

//新增
export const postV1OmsDept = (data?: object) => {
  return http.request<any>("post", `/${apiRouter}?action=create`, { data });
};

//菜单树列表
export const getV1OmsDeptTree = (data?: object) => {
  return http.request<any>("post", `/${apiRouter}?action=tree`, { data });
};

//获取详情
export const getV1OmsDeptDetail = (data?: object) => {
  return http.request<any>("post", `/${apiRouter}?action=info`, { data });
};

//删除
export const deleteV1OmsDeptDetail = (data?: object) => {
  return http.request<any>("post", `/${apiRouter}?action=delete`, { data });
};
